package no.awi.wpd.combat.model;

import no.awi.wpd.probability.ProbabilityDistribution;
import no.awi.wpd.unit.model.Profile;

public class AttackStep {

    private InitiativeStep initiativeStep;

    private ContactZone attackers;

    private Profile attackerProfile;

    private ProbabilityDistribution autohits;

    private int autohitsStrength;

    private ProbabilityDistribution woundsCaused;

    public AttackStep(ContactZone attackers, Profile attackerProfile) {
        this(attackers, attackerProfile, attackerProfile.getInitiativeStep(), null);
    }

    public AttackStep(ContactZone attackers, Profile attackerProfile, InitiativeStep initiativeStep,
                      ProbabilityDistribution autohits) {
        this.attackers = attackers;
        this.attackerProfile = attackerProfile;
        this.initiativeStep = initiativeStep;
        this.autohits = autohits;
    }

    public Profile getAttackerProfile() {
        return attackerProfile;
    }

    public ProbabilityDistribution getAutohits() {
        return autohits;
    }

    public void setAutohits(ProbabilityDistribution autohits) {
        this.autohits = autohits;
    }

    public int getAutohitsStrength() {
        return autohitsStrength;
    }

    public void setAutohitsStrength(int autohitsStrength) {
        this.autohitsStrength = autohitsStrength;
    }

    public ProbabilityDistribution getWoundsCaused() {
        return woundsCaused;
    }

    public void setWoundsCaused(ProbabilityDistribution woundsCaused) {
        this.woundsCaused = woundsCaused;
    }

    public InitiativeStep getInitiativeStep() {
        return initiativeStep;
    }

    public ContactZone getAttackers() {
        return attackers;
    }

    public boolean isAutohits() {
        return autohits != null;
    }
}
